3.60 \(\int \frac{x^2 \left (A+B x^2\right )}{a+b x^2} \, dx\)

Optimal. Leaf size=58 \[ -\frac{\sqrt{a} (A b-a B) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{b^{5/2}}+\frac{x (A b-a B)}{b^2}+\frac{B x^3}{3 b} \]

[Out]

((A*b - a*B)*x)/b^2 + (B*x^3)/(3*b) - (Sqrt[a]*(A*b - a*B)*ArcTan[(Sqrt[b]*x)/Sq
rt[a]])/b^(5/2)

_______________________________________________________________________________________

Rubi [A]  time = 0.10151, antiderivative size = 58, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.15 \[ -\frac{\sqrt{a} (A b-a B) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{b^{5/2}}+\frac{x (A b-a B)}{b^2}+\frac{B x^3}{3 b} \]

Antiderivative was successfully verified.

[In]  Int[(x^2*(A + B*x^2))/(a + b*x^2),x]

[Out]

((A*b - a*B)*x)/b^2 + (B*x^3)/(3*b) - (Sqrt[a]*(A*b - a*B)*ArcTan[(Sqrt[b]*x)/Sq
rt[a]])/b^(5/2)

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 15.7168, size = 49, normalized size = 0.84 \[ \frac{B x^{3}}{3 b} - \frac{\sqrt{a} \left (A b - B a\right ) \operatorname{atan}{\left (\frac{\sqrt{b} x}{\sqrt{a}} \right )}}{b^{\frac{5}{2}}} + \frac{x \left (A b - B a\right )}{b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(x**2*(B*x**2+A)/(b*x**2+a),x)

[Out]

B*x**3/(3*b) - sqrt(a)*(A*b - B*a)*atan(sqrt(b)*x/sqrt(a))/b**(5/2) + x*(A*b - B
*a)/b**2

_______________________________________________________________________________________

Mathematica [A]  time = 0.062653, size = 57, normalized size = 0.98 \[ \frac{\sqrt{a} (a B-A b) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{b^{5/2}}+\frac{x (A b-a B)}{b^2}+\frac{B x^3}{3 b} \]

Antiderivative was successfully verified.

[In]  Integrate[(x^2*(A + B*x^2))/(a + b*x^2),x]

[Out]

((A*b - a*B)*x)/b^2 + (B*x^3)/(3*b) + (Sqrt[a]*(-(A*b) + a*B)*ArcTan[(Sqrt[b]*x)
/Sqrt[a]])/b^(5/2)

_______________________________________________________________________________________

Maple [A]  time = 0.003, size = 68, normalized size = 1.2 \[{\frac{B{x}^{3}}{3\,b}}+{\frac{Ax}{b}}-{\frac{Bxa}{{b}^{2}}}-{\frac{aA}{b}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}+{\frac{{a}^{2}B}{{b}^{2}}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(x^2*(B*x^2+A)/(b*x^2+a),x)

[Out]

1/3*B*x^3/b+1/b*A*x-1/b^2*B*x*a-a/b/(a*b)^(1/2)*arctan(x*b/(a*b)^(1/2))*A+a^2/b^
2/(a*b)^(1/2)*arctan(x*b/(a*b)^(1/2))*B

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x^2 + A)*x^2/(b*x^2 + a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.250151, size = 1, normalized size = 0.02 \[ \left [\frac{2 \, B b x^{3} - 3 \,{\left (B a - A b\right )} \sqrt{-\frac{a}{b}} \log \left (\frac{b x^{2} - 2 \, b x \sqrt{-\frac{a}{b}} - a}{b x^{2} + a}\right ) - 6 \,{\left (B a - A b\right )} x}{6 \, b^{2}}, \frac{B b x^{3} + 3 \,{\left (B a - A b\right )} \sqrt{\frac{a}{b}} \arctan \left (\frac{x}{\sqrt{\frac{a}{b}}}\right ) - 3 \,{\left (B a - A b\right )} x}{3 \, b^{2}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x^2 + A)*x^2/(b*x^2 + a),x, algorithm="fricas")

[Out]

[1/6*(2*B*b*x^3 - 3*(B*a - A*b)*sqrt(-a/b)*log((b*x^2 - 2*b*x*sqrt(-a/b) - a)/(b
*x^2 + a)) - 6*(B*a - A*b)*x)/b^2, 1/3*(B*b*x^3 + 3*(B*a - A*b)*sqrt(a/b)*arctan
(x/sqrt(a/b)) - 3*(B*a - A*b)*x)/b^2]

_______________________________________________________________________________________

Sympy [A]  time = 1.79807, size = 90, normalized size = 1.55 \[ \frac{B x^{3}}{3 b} - \frac{\sqrt{- \frac{a}{b^{5}}} \left (- A b + B a\right ) \log{\left (- b^{2} \sqrt{- \frac{a}{b^{5}}} + x \right )}}{2} + \frac{\sqrt{- \frac{a}{b^{5}}} \left (- A b + B a\right ) \log{\left (b^{2} \sqrt{- \frac{a}{b^{5}}} + x \right )}}{2} - \frac{x \left (- A b + B a\right )}{b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x**2*(B*x**2+A)/(b*x**2+a),x)

[Out]

B*x**3/(3*b) - sqrt(-a/b**5)*(-A*b + B*a)*log(-b**2*sqrt(-a/b**5) + x)/2 + sqrt(
-a/b**5)*(-A*b + B*a)*log(b**2*sqrt(-a/b**5) + x)/2 - x*(-A*b + B*a)/b**2

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.230644, size = 77, normalized size = 1.33 \[ \frac{{\left (B a^{2} - A a b\right )} \arctan \left (\frac{b x}{\sqrt{a b}}\right )}{\sqrt{a b} b^{2}} + \frac{B b^{2} x^{3} - 3 \, B a b x + 3 \, A b^{2} x}{3 \, b^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x^2 + A)*x^2/(b*x^2 + a),x, algorithm="giac")

[Out]

(B*a^2 - A*a*b)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*b^2) + 1/3*(B*b^2*x^3 - 3*B*a*b
*x + 3*A*b^2*x)/b^3